package com.ruoyi.yz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yz.mapper.YzConferenceMapper;
import com.ruoyi.yz.domain.YzConference;
import com.ruoyi.yz.service.IYzConferenceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 会议Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-14
 */
@Service("conference")
public class YzConferenceServiceImpl implements IYzConferenceService
{
    @Autowired
    private YzConferenceMapper yzConferenceMapper;

    /**
     * 查询会议
     *
     * @param id 会议主键
     * @return 会议
     */
    @Override
    public YzConference selectYzConferenceById(Long id)
    {
        return yzConferenceMapper.selectYzConferenceById(id);
    }

    /**
     * 查询会议列表
     *
     * @param yzConference 会议
     * @return 会议
     */
    @Override
    public List<YzConference> selectYzConferenceList(YzConference yzConference)
    {
        return yzConferenceMapper.selectYzConferenceList(yzConference);
    }

    /**
     * 新增会议
     *
     * @param yzConference 会议
     * @return 结果
     */
    @Override
    public int insertYzConference(YzConference yzConference)
    {
        yzConference.setCreateTime(DateUtils.getNowDate());
        return yzConferenceMapper.insertYzConference(yzConference);
    }

    /**
     * 修改会议
     *
     * @param yzConference 会议
     * @return 结果
     */
    @Override
    public int updateYzConference(YzConference yzConference)
    {
        yzConference.setUpdateTime(DateUtils.getNowDate());
        return yzConferenceMapper.updateYzConference(yzConference);
    }

    /**
     * 批量删除会议
     *
     * @param ids 需要删除的会议主键
     * @return 结果
     */
    @Override
    public int deleteYzConferenceByIds(String ids)
    {
        return yzConferenceMapper.deleteYzConferenceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除会议信息
     *
     * @param id 会议主键
     * @return 结果
     */
    @Override
    public int deleteYzConferenceById(Long id)
    {
        return yzConferenceMapper.deleteYzConferenceById(id);
    }
}
